Computers / Programming / Projects / Altair 8800 / Front-Panel Adder / Demo Programs

These programs were used to test functionality used in the Front-Panel Adder program

Note that these programs were hand-assembled so the syntax may not be correct. They were entered into the computer using the front-panel switches. Hex values us the H suffix and octal values use the Q suffix.

Infinite Loop

Infinite loop
Infinite loop

loop.asm

asm type icon
Type: Program
Language: 8080 Assembly
loop.asm

The JMP instruction sets the address of the next instruction to be executed. In this case the address jumped to is 0000 which is also the address of the JMP instruction. This causes the program to simply loop forever executing the same instruction over and over. The lights on the front panel of the Altair indicate the address that is currently being accessed by the computer. This program reads values from the addresses 0000 to 0002 to read the jump instruction. The A0 light is going to be on when reading the memory at 0001 and A1 will be on when reading the memory at 0002. Because the program loops so fast it looks like both A0 and A1 are on at all times.

Loop and Display

Loop on Address
Loop on Address

LoopAdr.asm

asm type icon
Type: Program
Language: 8080 Assembly
LoopAdr.asm

This program loads the value 5AH into the accumulator and then copies it to the D register. It then repeatedly executes LDAX D. This causes the value loaded in the DE register pair to be accessed by the program which causes the address in the DE register pair to be shown on the front-panel lights. The D register determines the high-byte of the address so the value we loaded into the D registered will be displayed on the A8 to A15 lights. The value in the E register isn't set so the low 8 bits of the address accessed are random. This is fine because the lights from reading the bytes of the program will also be on.

Read Switches and Display

Read Switches and Loop
Read Switches and Loop

ReadAndLoop.asm

asm type icon
Type: Program
Language: 8080 Assembly
ReadAndLoop.asm

This program performs an input instruction on the address FFH which reads the value of the 8 to 15 switches into the accumulator. This value then gets copied to the D register and gets displayed the same way as with the previous demo except that the value displayed is based on the switch position.

Read Switches and Display Low Bits

Read Low Switches and Loop
Read Low Switches and Loop

ReadLowAndLoop.asm

asm type icon
Type: Program
Language: 8080 Assembly
ReadLowAndLoop.asm

This program is very similar to the previous program except it AND's the value read in with 0FH to clear out the high-order 4 bits of the value read from the switches.

Read Switches and Display High Bits

Read High Switches and Loop
Read High Switches and Loop

ReadHighAndLoop.asm

asm type icon
Type: Program
Language: 8080 Assembly
ReadHighAndLoop.asm

This program is very similar to the previous programs except it rotates the accumulator right four times before 'and'ing and displaying the result. This causes the high four bits of the value read in to be displayed